<template>
    <h3>ChildEvent</h3>
    <button @click="clickEvent">传递数据给父级</button>
</template>
<script>
export default {
    data(){
        return{
            msg:"Tom"
        }
    },
    methods:{
        clickEvent(){
            console.log("传递数据给父级");
            //自定义事件
            this.$emit("someEvent", this.msg)//参数：父级要实现的名称，传递数据
        }
    }
}
</script>